import axios from "../utils/request";
//获取评论信息
export const $getComments=async(params)=>{
    let {data}=await axios.get('post/comments',{params:params});
    return data;
}
//获取某帖子下评论的条数
export const $getCommentCount=async(params)=>{
    let {data}=await axios.get('post/commentsCount',{params:params});
    return data;
}
//将输入框中的内容发送后端形成新的评论
export const $newComment=async(params)=>{
    let {data}=await axios.post('post/newComment',params);
    return data;
}
//审核帖子的通过与不通过
export const $CheckPost=async(params)=>{
    let {data}=await axios.put('post/moderatePost',params);
    return data;
}
//根据帖子id获取帖子的编号
export const $getSharePost=async(params)=>{
    let {data}=await axios.get('post/getPostById',{params:params});
    return data;
}
//分享帖子
export const $SharePost=async(params)=>{
    let {data}=await axios.post('post/share',params);
    return data;
}
//帖子的点赞和点踩
export const $CheckLike=async(params)=>{
    let {data}=await axios.put('post/postIsLike',params);
    return data;
}
//获取帖子点赞和点踩的数量
export const $showLike=async(params)=>{
    let {data}=await axios.get('post/showLikeStatus',{params:params});
    return data;
}